package com.app.designpatternslearn.behavior.nullobjectpattern.code

class CustomerFactory {

    private val names = arrayOf("aaa", "bbbb", "cccc")

    fun getCustomer(name: String): AbstractCustomer = when(name) {
        in names -> RealCustomer()
        else -> NullCustomer()
    }
}